﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;

namespace LoA.Shared.Screen.Entities {
	public class ScreenEntity : IScreen {
		public ScreenEntity( ) {
			this.ScreenEntries = new List<IScreenEntry>( );
		}

		public ScreenEntity(IEnumerable<IScreenEntry> entries) {
			this.ScreenEntries = new List<IScreenEntry>(entries);
		}

		public ScreenEntity(string title) {
			this.Title = title;
			this.ScreenEntries = new List<IScreenEntry>( );
		}

		public ScreenEntity(string title, IEnumerable<IScreenEntry> entries) {
			this.Title = title;
			this.ScreenEntries = new List<IScreenEntry>(entries);
		}

		[ContentSerializer]
		public string Title { get; private set; }

		[ContentSerializer]
		private List<IScreenEntry> ScreenEntries;
		[ContentSerializerIgnore]
		public ReadOnlyCollection<IScreenEntry> Entries { get { return this.ScreenEntries.AsReadOnly( ); } }
	}
}
